<template>
	<view :class="[BackGround]" :style="[{'font-weight':Style,'font-family':Font,height:100 + '%',minHeight:height + 'px'}]">
		<cu-custom bgColor="bg-gradual-blue" isBack="true">
			<view slot="backText">返回</view>
			<view slot="content">环境监测</view>
		</cu-custom>
		<list-box :list="list" @jumpview="jumpview" @zylongtap="zylongtap"></list-box>
		<chunLei-popups v-model="value1" :popData="data1" @tapPopup="tapPopup" @zyinput="zyinput" :x="x" :y="y" placement="top-end"></chunLei-popups>
	</view>
</template>

<script>
	import chunLeiPopups from "@/colorui/components/chunLei-popups/chunLei-popups"
	import ListBox from '@/colorui/components/list'
	import {
		mapGetters
	} from 'vuex'
	import {
		Commonly,
	} from "@/mixin/mixin.js"
	export default {
		mixins:[Commonly],
		data() {
			return {
				height:this.screenHeight,
				list: [{
					img: "/static/images/timedata.png",
					name: '实时数据',
					isShow:false,
					id: 0
				}, {
					img: "/static/images/Datatrend.png",
					name: '实时数据趋势图',
					isShow:false,
					id: 1
				}, {
					img: "/static/images/TemperatureReport.png",
					url:"./temperature/TemperatureReport/TemperatureReport",
					name: '温湿度报表',
					LMENUID:'971101',
					isShow:false,
					id: 2
				}],
			}
		},
		computed: {
			...mapGetters([
				'Style', 'Font','BackGround','BackGroundBox'
			])
		},
		components: {
			ListBox,
			chunLeiPopups
		},
		onLoad() {
			let tree = uni.getStorageSync('tree')
			for (let value of tree) {
				if (value.LPARENTID == '00') {
					for (let qq of value.children) {
						if (qq.LMENUID == '9711') {
							for (let hh of qq.children) {
								for(let ww of this.list) {
									if(hh.LMENUID == ww.LMENUID) {
										ww.isShow = true
									}
								}
							}
						}
					}
				}
			}
		},
		methods: {
			jumpview(index) {
				switch (index) {
					case 0:
						uni.navigateTo({
							url: './timedata/timedata'
						})
						break;
					case 1:
						uni.navigateTo({
							url: './Datatrend/Datatrend'
						})
						break;
					case 2:
						uni.navigateTo({
							url: './TemperatureReport/TemperatureReport'
						})
						break;
				}
			}
		}
	}
</script>

<style>

</style>
